<template>
  <div>
    <Toheader title="购物车案例" backgroundColor="red" color="black"></Toheader>
    <div class="main">
      <Togoods :goodobj="obj" v-for="obj in list" :key="obj.id"></Togoods>
    </div>
    <Tofooter :arr1="list"></Tofooter>
  </div>
</template>

<script>
import Tofooter from "./components/anli/tofooter.vue";
import Togoods from "./components/anli/togoods.vue";
import Toheader from "./components/anli/toheader.vue";
export default {
  data() {
    return {
      list: [],
    };
  },
  created() {
    this.$axios({
      url: " https://www.escook.cn/api/cart ",
    }).then((res) => (this.list = res.data.list));
  },
  components: { Toheader, Togoods, Tofooter },
};
</script>

<style scoped>
.main {
  padding: 45px 0 50px 0;
}
</style>